import 'package:card_topia/api/api_result.dart';
import 'package:flutter/material.dart';

import '../api/api_path.dart';
import '../api/network_util.dart';


///登录相关接口
class LoginService{
  //验证码登录接口
  static Future<ApiResult> loginByCode({required String email,required String code})async{
    return await NetworkUtil.post(path: ApiPath.loginByCodePath,data: {
      "email":email,
      "code":code,
    });
  }

  //密码登录接口
  static Future<ApiResult> loginByPwd({required String email,required String pwd})async{
    return await NetworkUtil.post(path: ApiPath.loginByPwdPath,data: {
      "email": email,
      "password": pwd,
    });
  }
}